package com.xuecheng.learning.controller;

import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.dto.WorkDto;
import com.xuecheng.commons.model.vo.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xuecheng.learning.service.WorkService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 * 作业前端控制器
 * </p>
 *
 * @author itheima
 */
@Slf4j
@RestController
public class WorkController {

    @Autowired
    private WorkService  workService;

    //分页条件查询课程计划作业列表
    @PostMapping("/work/list")
    public ResponseResult workList(PageRequest request, @RequestBody WorkDto dto){
        return workService.workList(request,dto);
    }
}
